package com.ruoyi.employee.service.impl;

import com.ruoyi.employee.domain.EmployeeFinance;
import com.ruoyi.employee.mapper.EmployeeFinanceMapper;
import com.ruoyi.employee.service.IEmployeeFinanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.validation.Validator;
import java.math.BigDecimal;
import java.util.List;

/**
 * 店员财务 业务层处理
 * 
 * @author ruoyi
 */
@Service
public class EmployeeFinanceServiceImpl implements IEmployeeFinanceService
{

    @Autowired
    private EmployeeFinanceMapper employeeFinanceMapper;

    @Autowired
    protected Validator validator;

    /**
     * 根据条件分页查询店员财务列表
     * 
     * @param employeeFinance 店员财务信息
     * @return 店员财务信息集合信息
     */
    @Override
    public List<EmployeeFinance> selectEmployeeFinanceList(EmployeeFinance employeeFinance)
    {
        return employeeFinanceMapper.selectEmployeeFinanceList(employeeFinance);
    }

    /**
     * 新增保存店员财务信息
     * 
     * @param user 店员财务信息
     * @return 结果
     */
    @Override
    @Transactional
    public int insertEmployeeFinance(EmployeeFinance user)
    {
        // 新增店员财务信息
        int rows = employeeFinanceMapper.insertEmployeeFinance(user);
        return rows;
    }
}
